#include<iostream>
#include<algorithm>
using namespace std;


int valid(int a,int b,int c)  
{  
    return a+b>c && a+c>b && b+c>a;  
}  

int partion(int * a,int p,int q)  
{  
    int i,j;  
    for(i = p-1,j = p;j<q;++j)  
    {  
        if(a[j] < a[q] && a[++i]> a[q])  
            swap( a[i],a[j] );  
    }  
    swap(a[i+1],a[q]);  
    return i+1;  
}  

int subtri(int * a,int p,int q)  
{  
    int mid;   
    if(q-p+1 < 3)return 0;  
        mid = partion(a,p,q);  
    if(subtri(a,p,mid-1)||subtri(a,mid+1,q))return 1;  
    else  
    {  
        int l,r;  
        for(l = p;l<mid;l++)  
            for(r = mid+1;r <= q;++r)  
            {  
                if(valid(a[r],a[l],a[mid]))return 1;  
            }  
        for(l = p;l<mid;l++)  
            for(r = p;r<mid;r++)  
            {  
                if(r != l && valid(a[r],a[l],a[mid]))return 1;  
            }  
        for(l = mid+1;l<=q;l++)  
            for(r = mid+1;r<=1;r++)  
            {  
                if(r != l && valid(a[r],a[l],a[mid]))return 1;  
            }  
    }  
    return 0;  
}  

int main()  
{  
   //int a[] = {20,5,30};
    int a[] = {20 ,5,30,15};
    //int a[] = {32};
    //int a[] = {32,60,45};
    if( subtri(a,0,3) )cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
    system("pause");
    return 0;  
}  

